package com.cn.yz.service.sysauthority.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;

@Configuration
@PropertySource(value = "classpath:system.properties")
@ConfigurationProperties()
public class SystemConfigBean {
	

	public int getSaltLength() {
		return saltLength;
	}

	public int getTokenLength() {
		return tokenLength;
	}

	@Value("${system.salt.length}")
	private int saltLength;

	@Value("${system.token.length}")
	private int tokenLength;
	
	@Value("${system.cookie.age}")
	private int cookieAge;

	public int getCookieAge() {
		return cookieAge;
	}

	public void setCookieAge(int cookieAge) {
		this.cookieAge = cookieAge;
	}

	public void setSaltLength(int saltLength) {
		this.saltLength = saltLength;
	}

	public void setTokenLength(int tokenLength) {
		this.tokenLength = tokenLength;
	}

}
